package com.cruise.game.controller.common;

import com.cruise.game.common.api.ApiResult;
import com.cruise.game.controller.BaseController;
import com.cruise.game.model.vo.common.HomeVO;
import com.cruise.game.service.common.HomeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 首页控制器
 * 
 * @author cruise
 * @date 2025-02-28
 */
@Slf4j
@Api(tags = "首页相关接口")
@RestController
@RequestMapping("/api/home")
public class HomeController extends BaseController {

    @Resource
    private HomeService homeService;

    /**
     * 获取首页数据
     */
    @ApiOperation("获取首页数据")
    @GetMapping
    public ApiResult<HomeVO> getHomeData() {
        return ApiResult.success(homeService.getHomeData());
    }
}
